/*
 * @Author: ChunLai
 * @Date: 2022-09-27 14:23:37
 * @LastEditTime: 2025-11-21 14:44:20
 * @Description: 保单信息填入
 * @FilePath: \01.latest-short-insure\src\mixins\info_bill.js
 */
import { mapGetters } from "vuex";

export const InsureBtnHandleMixin = {
  computed: {
    ...mapGetters({
      presureCfg: "page/presureCfg",
      preNotice: "page/preNotice",
    }),
    isPreSurePage() {
      let res = false;
      if (this.presureCfg && this.presureCfg.length > 0) {
        res = true;
      }
      return res;
    },
  },
  methods: {
    nextRouterMixin() {
      if (this.preNotice) {
        this.$router.push("/prenotice"); // 前置告知
        return;
      }
      if (this.isPreSurePage) {
        this.$router.push("/presure");
        return;
      }
      this.$router.push("/form");
    },
  },
};
